package com.example.demo.mapper;

import com.example.demo.entity.Articleinfo;
import com.example.demo.entity.viewobject.ArticleinfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {
    // 增
    Integer insert(Articleinfo article);

    // like 查询 -> 返回值利用 resultMap.
    List<Articleinfo> getArtiByTitle(@Param("title") String title);

    // 多表查询
    ArticleinfoVO getById(@Param("id") Integer id);
}
